class csns::ofed (
  $nic_name = hiera('csns::ofed::nic_name',"ens4f0"),
  $nic_ipaddr = hiera('csns::ofed::nic_ipaddr',"172.0.0.1"),
  $route_addr = hiera('csns::ofed::route_addr',[ '172.0.0.0', ]),
  $route_netmask = hiera('csns::ofed::route_netmask',[ '255.255.252.0', ]),
  $route_gateway = hiera('csns::ofed::route_gateway',[ '172.0.0.1', ]),
)
{
  #case $architecture {
  #"x86_64":{
     package{"mlnx-ofed-all":
       ensure   => present,
       require  => Yumrepo['site']
  #   }
  # }
  #"aarch64":{
  #  package{["mlnxofed-docs","ofed-scripts","rdma-core","libibverbs","libibverbs-utils","librdmacm","libibumad","infiniband-diags","rdma-core-devel","librdmacm-utils","mstflint","mft","mlnx-ethtool","mlnx-iproute2",]:
   #   ensure   => present,
   #   require  => Yumrepo['site']
  #}
  #}
  }->
  service { "mst":
    ensure     => 'running',
    enable     => true,
    hasrestart => true,
    hasstatus  => true,
  }
  network::interface {"$nic_name":
    ipaddress => "$nic_ipaddr",
    netmask   => "255.255.255.0",
  }
  network::route {"$nic_name":
    ipaddress => $route_addr,
    netmask   => $route_netmask,
    gateway   => $route_gateway,
  }
}
